package cn.net.sinodata.system.mapper;

import cn.net.sinodata.system.domain.BmTransLogMsg;
import cn.net.sinodata.system.domain.vo.BmTransLogMsgVo;
import cn.net.sinodata.common.mybatis.core.mapper.BaseMapperPlus;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

/**
 * 交易日志报文Mapper接口
 *
 * @author chenbaijun
 * @date 2025-10-31
 */
public interface BmTransLogMsgMapper extends BaseMapperPlus<BmTransLogMsg, BmTransLogMsgVo> {

    /**
     * 根据交易流水查询交易日志报文
     *
     * @param transLogRecordId 交易流水
     * @return 交易日志报文
     */
    default BmTransLogMsgVo selectByTransSerial(String transLogRecordId) {
        return selectVoOne(
            new LambdaQueryWrapper<BmTransLogMsg>().eq(BmTransLogMsg::getTransLogRecordId, transLogRecordId));
    }
}
